public class Pagination {

    //每页记录数
    private int pageSize = 5;
    //当前页码
    private int pageNo = 1;
    //总页数
    private int totalPages = 1;

    public Pagination() {}

    public Pagination(int pageSize, int pageNo) {
        if (pageSize > 0) {
            this.pageSize = pageSize;
        }
        if (pageNo > 0) {
            this.pageNo = pageNo;
        }
    }

    //getter方法
    public int getPageSize() {
        return pageSize;
    }
    public int getPageNo() {
        return pageNo;
    }
    public int getTotalPages() {
        return totalPages;
    }

    //setter方法
    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }
    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }
    public void setTotalPages(int totalPages) {
        this.totalPages = totalPages;
    }
}
